#>author: fuml
#>date:2019-9-7
#>desc:生成器

# 斐波那契数列
def fib(max):
    n,before,after=0,0,1
    while n < max:
        print(after,end='  ')
        before,after= after,after+before
        n+=1

fib(10)

# 生成器的send 方法
generator=fib(8)

